<#include "/common/head.ftl">

<html>

<head>

<title>Midterm Test Result</title>

<style>
	
* {
	font-size:0.35cm;
}

table.nameTable {
	empty-cells:show;
	border-top: 1px solid black;
	border-right: 1px solid black;
}

table.nameTable tr {
	
}

table.nameTable tr td {
	border-left: 1px solid black;
	border-bottom: 1px solid black;
}

</style>

</head>

<body style="padding:0cm">

<div style="width:26cm;text-align:left;margin:0cm;padding:0px">

<table cellspacing="5" cell style="font-weight:bold;width:19cm">
	<tr>
		<td rowspan="3"><img src="../images/saigontech.gif"/></td>
		<td colspan="2"><h2>MIDTERM TEST RESULT - ${(offering.name)!}, ${(offering.shift.startTime?time)!} - ${(offering.shift.endTime?time)!}</h2></td>
	</tr>
	<tr>
		<td>Begin Date: ${(offering.startDate?date)!}</td>
		<td>Test Date: ${(offering.midtermWrittenDate?date)!}</td>	
	</tr>
	<tr>
		<td>Finish Date: ${(offering.endDate?date)!}</td>
		<td>Teachers: ${action.printTeachers(offering.instructors)}</td>
	</tr>
</table>

<table class="nameTable" style="width:100%" cellspadding="0" cellspacing="0">
	<tr style="text-align:center;font-weight:bold;background-color:#D6FAEB">
		<td style="width:0.7cm">No.</td>
		<td colspan="2">Student's Name</td>
		<td style="width:2cm">Nick Name</td>
		<td style="width:2cm">Receipt</td>
		<td style="width:2.5cm">Tel No.</td>
		<td style="width:1.7cm">D.O.B</td>
		<td style="width:1.3cm">Gender</td>
		
		<@showWhenChildren offering>
			<td style="width:1.3cm">Listening</td>
			<td style="width:1.3cm">R & W</td>
		</@showWhenChildren>
		
		<@showWhenTeenager offering>
			<td style="width:1.3cm">Listening</td>
			<td style="width:1.3cm">Voca&Gra</td>
			<td style="width:1.3cm">Reading</td>
			<td style="width:1.3cm">Writing</td>
		</@showWhenTeenager> 
		
		<@showWhenGE offering>
			<td style="width:1.3cm">Listening</td>
			<td style="width:1.3cm">Pronun</td>
			<td style="width:1.3cm">Voca&Gra</td>
			<td style="width:1.3cm">Reading</td>
			<td style="width:1.3cm">Writing</td>
		</@showWhenGE>
		
		<@showWhenOther offering>
			<td style="width:1.3cm">Listening</td>
			<td style="width:1.3cm">Voca&Gra</td>
			<td style="width:1.3cm">Reading</td>
			<td style="width:1.3cm">Writing</td>
		</@showWhenOther> 	
		
		<td style="width:1.3cm">Total</td>
		<#if noted>
			<td style="width:4.5cm">Note</td>
		<#else>
			<td style="width:1.3cm">Note</td>
		</#if>
		<td style="width:1.3cm">Signature</td>
	</tr>
	<#list offeringMembers as member>
		<tr>
			<td style="text-align:center">${member_index + 1}</td>
			<td style="border-right:0cm;width:3.3cm">${(member.receipt.student.lastName)!}</td>
			<td style="border-left:0cm;font-weight:bold;width:1.2cm">${(member.receipt.student.firstName)!}</td>
			<td style="border-right:0cm;width:2cm">${(member.receipt.student.nickName)!}</td>
			<td style="text-align:center">${(member.receipt.number)!'&nbsp;'}</td>
			<td>${(View.trimPhoneNumber(member.receipt.student.phoneNumber))!'&nbsp;'}</td>
			<td style="text-align:center">${(member.receipt.student.dateOfBirth?date)!}</td>
			<td style="text-align:center">${i18n.getMessage('gender.${member.receipt.student.gender?lower_case}')}</td>
			
			
			<@showWhenChildren offering>
				<td style="text-align:center">${(member.midtermTest.listening)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.reading)!'&nbsp'}</td>
			</@showWhenChildren>
			
			<@showWhenTeenager offering>
				<td style="text-align:center">${(member.midtermTest.listening)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.grammar)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.reading)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.writing)!'&nbsp'}</td>
			</@showWhenTeenager> 
			
			<@showWhenGE offering>
				<td style="text-align:center">${(member.midtermTest.listening)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.pronunciation)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.grammar)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.reading)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.writing)!'&nbsp'}</td>
			</@showWhenGE>
			
			<@showWhenOther offering>
				<td style="text-align:center">${(member.midtermTest.listening)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.grammar)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.reading)!'&nbsp'}</td>
				<td style="text-align:center">${(member.midtermTest.writing)!'&nbsp'}</td>
			</@showWhenOther> 
			
			<td style="text-align:center">${(member.midtermTest.total)!'&nbsp'}</td>
			<td>${(member.midtermTest.comment)!'&nbsp'}</td>
			<td>&nbsp</td>
		</tr>
	</#list>
</table>

<br/><br/>

<table style="width:100%;text-align:center">
	<tr>
		<td>Hiệu trưởng ký duyệt <br/><br/><br/><br/><br/><br/>Nguyễn Thị Anh Thư</td>
		<td>Kế toán xác nhận <br/><br/><br/><br/><br/><br/>Nguyễn Thắng Bảo</td>
		<td>Ngày &nbsp;&nbsp; tháng &nbsp;&nbsp; năm ${(now.year + 1900)!} <br/> Người lập bảng <br/><br/><br/><br/><br/> Lê Thị Thanh Nhung</td>
	</tr>
</table>

</div>

</body>
</html>